<template>
	<div class="manage-list">
		<div class="manage-list-item" v-for="(item,index) in dataList " :key="item.id">
			<div class="info-bar">
				<div>{{item.contestMaster}}VS{{item.contestBranch}}（{{item.infoName}}）</div>
				<el-button v-if="btnDetail" circle icon="el-icon-right" type="success" size="small" @click="jumpDetail(item.proposalId)"></el-button>
			</div>
			<div class="line"></div>
			<div>
				<div class="info-row">
					支持幣種：{{item.symbol}}
				</div>
				<div class="info-row ">
					贊成票數：
					<span class="number f16">
                        <i class="fa fa-thumbs-up"></i>{{precisionDivision(item.forVotes,8) }}/{{precisionDivision(item.quorumVotes,8) }}
                    </span>

				</div>
				<div class="info-row ">
					反對票數：
					<span class="number f16"><i class="fa fa-thumbs-down"></i>{{precisionDivision(item.againstVotes,8)}}</span>
				</div>

				<div class="info-row" >
					投票截止：
					<i class="fa fa-clock-o"></i><span>{{ voteCutTimeFormat(item.endTime) }}</span>
				</div>
				<div class="info-row" :class="(item.statue==2 || item.statue==3 ) && 'c-red'">
					投票狀態：
					{{voteStatusObject[item.statue]}}
					({{item.statue}})
				</div>

				<!--<div class="info-row">-->
				<!--	賽事狀態： {{contestStatusCnByCompute(item.status,item.endTimeStr)}}-->
				<!--</div>-->

				<div class="info-row">
					發起時間：{{item.createTime}}
				</div>
				<div class="info-row"></div>
			</div>
			<!--<div class="line"></div>-->
			<!--<div class="btn-group">-->
			<!--    <el-button v-if="btnDetail" type="primary" size="mini" @click="jumpDetail(item.id)">详情</el-button>-->
			<!--    <slot></slot>-->
			<!--</div>-->
		</div>
	</div>
</template>

<script>
import { mixinsManage } from "@/views/manage/js/manage.mixins";
import { contestMixinsGlobal } from '@/views/contestHall/contest.mixins.global'

export default {
	name: "manageList",
	mixins : [mixinsManage,contestMixinsGlobal],
	props:{
		dataList:{ type:Array, default:[] },
		btnDetail:{type:Boolean,default:true}
	},
	computed:{

	},

	methods:{
		jumpDetail(id){
			this.$emit('actJumpDetail',id)
		}
	}
}
</script>

<style lang="less" scoped>

</style>